# -*- coding: utf-8 -*-
from decimal import Decimal
from pydantic import BaseModel

__author__ = "mahairong"
__email__ = "mahairong@qinsilk.com"


class Number(BaseModel):
    value: Decimal

class NumberTool:
    ROBOT_LIBRARY_SCOPE = "GLOBAL"
    ROBOT_LIBRARY_DOC_FORMAT = "ROBOT"
    ROBOT_EXIT_ON_FAILURE = True

    def compare_numbers(self, num1, num2):
        """比较两个数字是否相等
        """
        return  Number(value=num1) == Number(value=num2)
